<script setup>
import { ref } from 'vue'
import {useRoute} from 'vue-router'
import { meua } from '@/data-js/admin-nav/index.js'
const input = ref('')
const route=useRoute()
const meuaActive=defineModel()


</script>

<template>
    <div class="top meua">我的网络</div>
    <div class="search flex meua">
        <div class="search-input"><el-input v-model="input" placeholder="搜索"></el-input></div>
        <div class="sub-btn"><el-button>+</el-button></div>
    </div>
    <el-menu class="el-menu-vertical-demo" router>
        <el-menu-item v-for="(u, i) in meua" :index="`/admin/serverAdmin?id=${u.route}`" :key="i" @click="meuaActive=false"
            :class="route.fullPath.indexOf(`/serverAdmin?id=${u.route}`)!==-1 ? 'active-meua meua' : 'meua'">
            {{ u.label }}
        </el-menu-item>
    </el-menu>
</template>

<style scoped lang="less">

.el-menu-vertical-demo{
    border: none !important;
}
.top {
    font-size: 12px;
    margin-bottom: 10px;
    color: rgb(173, 173, 173);
}

.meua{
    margin:10px;
    border-radius: 10px;
}
.active-meua{
    background-color: rgb(128, 157, 212);
    color:white;
}
</style>